<!DOCTYPE html>
<html >
	<head>
<include file="Public:headinc" />		
		
<link href="<?php echo MY_CDN; ?>/css/index.css" rel="stylesheet" />
	</head>
	<body>
<!-- navigation -->
<include file="Public:nav" />
<!-- // navigation -->
		
<!-- header -->
<include file="Public:header" />
<!-- // header -->
		
<!-- category -->
<include file="Public:category" />
<!-- category -->
		
		<!-- banner -->
		<div class="y-banner">
			<div class="y-banner-bg" id="bannerbg">
				<img src="Upload/banner/banner_01.jpg" />
				<img src="Upload/banner/banner_02.jpg" />
				<img src="Upload/banner/banner_04.jpg" />
				<img src="Upload/banner/banner_03.jpg" />
			</div>
			<div class="y-banner-wrapper">
				<div class="y-banner-left">
					<div class="y-banner-padding">
						<!-- banner left area -->
					</div>
				</div>
				<div class="y-banner-right">
					<div class="y-banner-padding">
						<div class="y-banner-announcement">
							<?php 
							if(isset($_G['seo']['announcement'])) {
								echo $_G['seo']['announcement'];
							}
							?>
						</div>
						<div class="y-banner-btnArea">
							<a class="btn btn-inverse" target="_blank" href="<?php echo $_G['seo']['downloadurl'];?>">Download</a>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- // banner -->
		
		<!-- container -->
		<!-- 新闻 -->
		<div class="y-smallBlankBar"></div>
		<div class="y-container y-wrapper990">
			<div class="i-mainnews i-mainnewsLeft y-pullLeft">
				<div class="i-mainnewsLeft-mask">
					<div class="i-mainnewsLeft-mask-left y-pullLeft" id="ySwitchImgTitle">标题哇哈哈</div>
					<div class="i-mainnewsLeft-mask-right y-pullRight" id="ySwitchImgHandler">
						<!-- i 中间加空格是修复 ie7 不能垂直居中问题 -->
						<i class="y-dot" data-img="Upload/images/mid_090944880.jpg" data-title="这是title一">&nbsp;</i> 
						<i class="y-dot" data-img="Upload/images/mid_090114266.jpg" data-title="这是title三">&nbsp;</i>
						<i class="y-dot" data-img="Upload/images/mid_104547678.jpg" data-title="这是title三">&nbsp;</i>
					</div>
				</div>
				<img src="" width="380" height="260" id="ySwitchImg"/>
			</div>
			<div class="i-mainnews i-mainnewsRight y-pullRight">
				<div class="i-mainnewsPadding">
<!-- 推荐3篇 -->
<Article:list field="id,title,description,viewimage" where="isrecommend=1" order="id desc" limit="3" data="recmd"></Article:list>
					<div class="i-mainnewsRight-title"><h3>
						<?php if(isset($recmd[0]['id'])){ ?>
						<a href="{:y_u('Detail/index', 'id='.$recmd[0]['id'])}">{$recmd[0]['title']}</a>
						<?php } ?>
					</h3></div>
					<div class="i-mainnewsRight-left y-pullLeft">
						<ul>
<!-- 最新 7 篇 -->
<Article:list field="id,title" order="id desc" limit="7"></Article:list>
<foreach name="data" item="val">
<li><i class="y-disc"></i><a href="{:y_u('Detail/index', 'id='.$val['id'])}">{$val['title']}</a></li>
</foreach>
						</ul>
					</div>
					<div class="i-mainnewsRight-right y-pullRight">
						<div>
							<?php if(isset($recmd[1]['id'])){ ?>
							<div class="y-pullLeft">
								<a href="{:y_u('Detail/index', 'id='.$recmd[1]['id'])}"><img src="{:y_viewImage($recmd[1]['viewimage'])}" width="160" height="90"/></a>
							</div>
							<div class="i-mainnewsRight-rightList">
								<h5><a href="{:y_u('Detail/index', 'id='.$recmd[1]['id'])}">{$recmd[1]['title']}</a></h5>
								<p>
									{$recmd[1]['description']}
								</p>
							</div>
							<?php } ?>
						</div><div class="y-clearL"></div>
						<div>
							<?php if(isset($recmd[2]['id'])){ ?>
							<div class="y-pullLeft">
								<a href="{:y_u('Detail/index', 'id='.$recmd[2]['id'])}"><img src="{:y_viewImage($recmd[2]['viewimage'])}" width="160" height="90"/></a>
							</div>
							<div class="i-mainnewsRight-rightList">
								<h5><a href="{:y_u('Detail/index', 'id='.$recmd[2]['id'])}">{$recmd[2]['title']}</a></h5>
								<p>
									{$recmd[2]['description']}
								</p>
							</div>
							<?php } ?>
						</div><div class="y-clearL"></div>
					</div>
				</div>
			</div>
			<div class="y-clear"></div>
		</div>
		<!-- // 新闻 -->
		
		<!-- 楼层1 -->
		<div class="y-smallBlankBar"></div>
		<div class="y-container y-wrapper990">
			<div class="y-container-left">
				<div class="y-floor" id="firstFloor">
					<!-- 楼层title部分 -->
					<div class="y-floorTitle">
						<span class="y-floorbg y-floorbg-blue">日常</span>
						<div class="y-floorTitletALink">
							<span class="y-pullRight"><a href="javascript:;">更多</a></span>
							<a href="javascript:;" class="active">生活</a>
							<a href="javascript:;">随笔</a>
						</div>
					</div>
					<!-- 楼层内容部分 -->
					<div class="y-floorContent">
<!-- 生活16条 -->
<Article:list field="id,title,viewimage,posttime" where="articletypeid=2" order="id desc" limit="16"></Article:list>
						<div class="y-floorContent-padding">
							<ul class="y-thumbnails">
<?php 
for($i=0; $i<count($data); $i++) { 
	if($i>3) break;
?>
<li class="y-floorPic">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" class="y-thumbnail">
		<img src="{:y_viewImage($data[$i]['viewimage'])}" alt="{$data[$i]['title']}"/>
		<span>{$data[$i]['title']}</span>
	</a>
</li>
<?php } ?>
							</ul><div class="y-clear"></div>
							<ul class="y-floorList">
<?php for($i=4; $i<count($data); $i++) { ?>
<li class="y-floorListItem">
<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a>
</li>
<?php } ?>
							</ul><div class="y-clear"></div>
						</div>
						<div class="y-floorContent-padding" style="display:none">
							<ul class="y-thumbnails">
<!-- 随笔16条 -->
<Article:list field="id,title,viewimage,posttime" where="articletypeid=3" order="id desc" limit="16"></Article:list>
<?php 
for($i=0; $i<count($data); $i++) { 
	if($i>3) break;
?>
<li class="y-floorPic">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" class="y-thumbnail">
		<img src="{:y_viewImage($data[$i]['viewimage'])}" alt="{$data[$i]['title']}"/>
		<span>{$data[$i]['title']}</span>
	</a>
</li>
<?php } ?>
							</ul><div class="y-clearL"></div>
							<ul class="y-floorList">
<?php for($i=4; $i<count($data); $i++) { ?>
<li class="y-floorListItem">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a>
</li>
<?php } ?>
							</ul><div class="y-clear"></div>
						</div>
						
					</div>
				</div>
			</div>
			<div class="y-container-right">  <!-- 310px overflow:hidden; -->
				<h5>关注最多</h5>
				<ul class="y-container-right-list" id="floorRightList">
<!-- 生活 随笔 关注最多 6 条 -->
<Article:list field="id,title,description,viewimage,posttime" where="articletypeid=2 or articletypeid=3" order="viewnum desc" limit="6"></Article:list>
<?php
for($i=0; $i<count($data); $i++){ 
?>
<li class="y-container-right-item">
	<h6 >
		<span class="y-pullRight y-highlight">{:date('m/d', $data[$i]['posttime'])}</span>
		<i class="y-itemCurrent">{$i+1}</i>
		<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a>
	</h6>
	<div class="y-container-right-item-hidden">
		<div class="y-container-right-item-hiddenimg y-pullLeft">
			<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">
				<img src="{:y_viewImage($data[$i]['viewimage'])}" width="100" height="66"/>
			</a>
		</div>
		<div class="y-container-right-item-hiddendesc">
			{$data[$i]['description']}
		</div>
	</div>
	<div class="y-clear"></div>
</li>
<?php } ?>
				</ul>
			</div>
			<div class="y-clear"></div>
		</div><!-- // 楼层1 -->
		
		<!-- 楼层2 -->
		<div class="y-smallBlankBar"></div>
		<div class="y-container y-wrapper990">
			<div class="y-container-left">
				<div class="y-floor" id="secondFloor">
					<!-- 楼层title部分 -->
					<div class="y-floorTitle">
						<span class="y-floorbg y-floorbg-blue">技术宅</span>
						<div class="y-floorTitletALink">
							<span class="y-pullRight"><a href="javascript:;">更多</a></span>
							<a href="javascript:;" class="active">技术</a>
							<a href="javascript:;">扯淡</a>
						</div>
					</div>
					<!-- 楼层内容部分 -->
					<div class="y-floorContent">
						
						<div class="y-floorContent-padding">
							<ul class="y-thumbnails">
<!-- 技术 16 -->
<Article:list field="id,title,viewimage,posttime" where="articletypeid=1" order="id desc" limit="16"></Article:list>
<?php 
for($i=0; $i<count($data); $i++) { 
	if($i>3) break;
?>
<li class="y-floorPic">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" class="y-thumbnail">
		<img src="{:y_viewImage($data[$i]['viewimage'])}" alt="{$data[$i]['title']}"/>
		<span>{$data[$i]['title']}</span>
	</a>
</li>
<?php } ?>
							</ul><div class="y-clear"></div>
							<ul class="y-floorList">
<?php for($i=4; $i<count($data); $i++) { ?>
<li class="y-floorListItem">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a>
</li>
<?php } ?>	
							</ul><div class="y-clear"></div>
						</div>
						<div class="y-floorContent-padding" style="display:none">
							<ul class="y-thumbnails">
<!-- 扯淡 16 -->
<Article:list field="id,title,viewimage,posttime" where="articletypeid=5" order="id desc" limit="16"></Article:list>
<?php 
for($i=0; $i<count($data); $i++) { 
	if($i>3) break;
?>
<li class="y-floorPic">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" class="y-thumbnail">
		<img src="{:y_viewImage($data[$i]['viewimage'])}" alt="{$data[$i]['title']}"/>
		<span>{$data[$i]['title']}</span>
	</a>
</li>
<?php } ?>
							</ul><div class="y-clearL"></div>
							<ul class="y-floorList">
<?php for($i=4; $i<count($data); $i++) { ?>
<li class="y-floorListItem">
	<a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a>
</li>
<?php } ?>
							</ul><div class="y-clear"></div>
						</div>
						
					</div>
				</div>
			</div>
			<div class="y-container-right">  <!-- 310px overflow:hidden; -->
				<h5>干货</h5>
				<div class="y-container-right-news-list">
<!-- 干货 6 -->
<Article:list field="id,title,viewimage,posttime" where="articletypeid=1 or articletypeid=5" order="viewnum desc" limit="6"></Article:list>
<?php if(isset($data[0]['id'])) { ?>
<a href="" class="y-container-right-list-img">
	<span>{$data[0]['title']}</span>
	<img src="{:y_viewImage($data[0]['viewimage'])}" alt="{$data[0]['title']}" width="280"/>
</a>
<?php } ?>
<ul>
<?php for($i=1; $i<count($data); $i++){ ?>
	<li><i class="y-disc"></i><a href="{:y_u('Detail/index', 'id='.$data[$i]['id'])}" title="{$data[$i]['title']}">{$data[$i]['title']}</a></li>
<?php } ?>			
</ul>

				</div>
			</div>
			<div class="y-clear"></div>
		</div><!-- //楼层2 -->
		
		<!-- // container -->
		
<!-- footer -->
<include file="Public:footer" />
<!-- // footer -->
		
<!-- quick bar -->
<include file="Public:quickbar" />
<!-- // quick bar -->
		
<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/index.js"></script>
	</body>
</html>